package yl.hs.bmipfull.controllers.system;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import yl.hs.bmipfull.controllers.ControllerBase;
import yl.hs.bmipfull.service.system.IIconLocationService;
import yl.hs.bmipfull.viewmodels.WebResult;
import yl.hs.bmipfull.viewmodels.system.IconLocationMondel;

import java.util.List;

/**
 * 作用:   <br/>
 * 创建时间: 2022-03-17 17:15 <br/>
 *
 * @author 吴高丰
 */
@Api(value = "首页用户图标位置信息", tags = "系统管理——图标位置信息")
@RequestMapping("/api/iconlocation")
@RestController
public class IconlocationController extends ControllerBase {
    @Autowired
    IIconLocationService service;
    @ApiOperation(value = "保存用户图标位置信息", notes = "保存用户图标位置信息")
    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public WebResult Save(@RequestBody IconLocationMondel data){
        val save = service.save(data.getData());
        if(save>0){
            return success("操作成功");
        }
        return success("操作失败");
    }
}
